<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>编辑攻略</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
</head>
<body class="bg-gray-100">
    <div class="min-h-screen">
        <header class="bg-white shadow">
            <div class="max-w-7xl mx-auto py-6 px-4">
                <div class="flex justify-between items-center">
                    <h1 class="text-2xl font-bold text-gray-900">编辑攻略</h1>
                </div>
            </div>
        </header>

        <main class="max-w-7xl mx-auto py-6 sm:px-6 lg:px-8">
            <div class="bg-white shadow rounded-lg p-6">
                <form class="space-y-6">
                    <!-- 基本信息 -->
                    <div class="border-b pb-6">
                        <h2 class="text-lg font-bold mb-4">基本信息</h2>
                        <div class="grid grid-cols-2 gap-6">
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-2">攻略标题</label>
                                <input type="text" class="w-full border rounded-md px-4 py-2" value="示例攻略标题">
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-2">所属分类</label>
                                <select class="w-full border rounded-md px-4 py-2">
                                    <option selected>自然风光</option>
                                    <option>人文景观</option>
                                    <option>美食攻略</option>
                                </select>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-2">所属地区</label>
                                <select class="w-full border rounded-md px-4 py-2">
                                    <option selected>北京</option>
                                    <option>上海</option>
                                    <option>广州</option>
                                </select>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-2">标签</label>
                                <input type="text" class="w-full border rounded-md px-4 py-2" value="自然,风景,徒步">
                            </div>
                        </div>
                    </div>

                    <!-- 封面图片 -->
                    <div class="border-b pb-6">
                        <h2 class="text-lg font-bold mb-4">封面图片</h2>
                        <div class="space-y-4">
                            <div class="relative w-[375px] h-[211px] bg-gray-100 rounded-lg overflow-hidden">
                                <img src="#" alt="当前封面图" class="w-full h-full object-cover">
                                <button type="button" class="absolute top-2 right-2 bg-red-600 text-white p-2 rounded-full">
                                    <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
                                    </svg>
                                </button>
                            </div>
                            <div class="border-2 border-dashed rounded-lg p-6 text-center">
                                <div class="space-y-2">
                                    <svg class="mx-auto h-12 w-12 text-gray-400" stroke="currentColor" fill="none" viewBox="0 0 48 48">
                                        <path d="M28 8H12a4 4 0 00-4 4v20m32-12v8m0 0v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-4l-3.172-3.172a4 4 0 00-5.656 0L28 28M8 32l9.172-9.172a4 4 0 015.656 0L28 28m0 0l4 4m4-24h8m-4-4v8m-12 4h.02" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                                    </svg>
                                    <div class="text-sm text-gray-600">更换封面图片</div>
                                    <div class="text-xs text-gray-500">支持 JPG、PNG 格式，建议尺寸 750x422</div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 价格设置 -->
                    <div class="border-b pb-6">
                        <h2 class="text-lg font-bold mb-4">价格设置</h2>
                        <div class="grid grid-cols-2 gap-6">
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-2">售价（元）</label>
                                <input type="number" class="w-full border rounded-md px-4 py-2" value="99.00">
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-2">原价（元）</label>
                                <input type="number" class="w-full border rounded-md px-4 py-2" value="199.00">
                            </div>
                        </div>
                    </div>

                    <!-- 分销设置 -->
                    <div class="border-b pb-6">
                        <h2 class="text-lg font-bold mb-4">分销设置</h2>
                        <div class="space-y-4">
                            <div class="flex items-center">
                                <input type="checkbox" class="h-4 w-4 text-blue-600 rounded" checked>
                                <span class="ml-2 text-sm text-gray-700">开启分销</span>
                            </div>
                            <div class="grid grid-cols-2 gap-6">
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 mb-2">分销佣金比例（%）</label>
                                    <input type="number" class="w-full border rounded-md px-4 py-2" value="30">
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 攻略内容 -->
                    <div class="border-b pb-6">
                        <h2 class="text-lg font-bold mb-4">攻略内容</h2>
                        <div class="border rounded-md p-4 min-h-[300px]">
                            <!-- 富文本编辑器占位 -->
                            <div class="text-gray-700">
                                这里是攻略内容示例...
                            </div>
                        </div>
                    </div>

                    <!-- 提交按钮 -->
                    <div class="flex justify-center space-x-4">
                        <button type="button" class="px-6 py-2 border rounded-md">取消</button>
                        <button type="submit" class="px-6 py-2 bg-blue-600 text-white rounded-md">保存</button>
                    </div>
                </form>
            </div>
        </main>
    </div>
</body>
</html>